import sys
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton

def func_shoot():
    print("按键按下，钢铁侠变身")

def init_widget(w: QWidget):
    w.setWindowTitle("按钮")
    w.resize(640, 480)
    
    btn = QPushButton("变身")
    btn.setText("钢铁侠变身")
    
    btn.clicked.connect(func_shoot)
    
    btn.setParent(w)
    
if __name__ == '__main__':
    app = QApplication(sys.argv)
    w = QWidget()
    init_widget(w)
    w.show()
    sys.exit(app.exec_())
